package com.string;

/**
 * @Author 小闽
 * @Date 2024/9/29 16:31
 * @PackageName: com.string
 * @ClassName: StringExercise03
 * @Description: 字符串练习03
 * @Version 1.0
 */
public class StringExercise03 {
    public static void main(String[] args) {
        String a = "苏宁易购";
        String b = new String("苏宁易购");
        System.out.println(a.equals(b)); // true
        System.out.println(a == b); // false
        System.out.println(a == b.intern()); // true
        System.out.println(b == b.intern()); // false
    }
}
